package com.nannybear.View;

import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.RelativeLayout;

import com.nannybear.R;

/**
 * @brief Home view
 */
public class HomeScreen extends Screen{
    /********** DECLARATIONS **********/
    // Widget of the view
    private ImageView warning_temp ,warning_hum;
	private RelativeLayout home_screen_layout;

    // Tab buttons
    private ImageButton homeButton;
    private ImageButton tempButton;
    private ImageButton brightnessButton;
    private ImageButton humidityButton;
    private ImageButton babyStateButton;
    private ImageButton settingsButton;
    private ImageButton helpButton;

    /************ METHODS ************/
    /**
     * @brief constructor.
     */
    public HomeScreen(){
    }

    /**
     * @brief Show the view
     */
    public void display(){
        home_screen_layout.setVisibility(View.VISIBLE);
        warning_temp.setVisibility(View.VISIBLE);
        warning_hum.setVisibility(View.VISIBLE);
        homeButton.setBackgroundResource(R.drawable.home_active);
    }

    /**
     * @brief Close the view
     */
    public void close(){
        home_screen_layout.setVisibility(View.GONE);
        warning_temp.setVisibility(View.GONE);
        warning_hum.setVisibility(View.GONE);
        homeButton.setBackgroundResource(R.drawable.home_grey);
    }


    /*********** ACCESSORS ***********/
    public void setHomeButton(ImageButton homeBtn) {
        this.homeButton = homeBtn;
    }

    public ImageButton getHomeButton() {
        return homeButton;
    }

    public void setTempButton(ImageButton tempBtn) {
        this.tempButton = tempBtn;
    }

    public ImageButton getTempButton() {
        return tempButton;
    }

    public void setBrightnessButton(ImageButton brightnessBtn) {
        this.brightnessButton = brightnessBtn;
    }

    public ImageButton getBrightnessButton() {
        return brightnessButton;
    }

    public void setHumidityButton(ImageButton humidityBtn) {
        this.humidityButton = humidityBtn;
    }

    public ImageButton getHumidityButton() {
        return humidityButton;
    }

    public void setBabyStateButton(ImageButton babyStateBtn) {
        this.babyStateButton = babyStateBtn;
    }

    public ImageButton getBabyStateButton() {
        return babyStateButton;
    }

    public void setSettingsButton(ImageButton settingsBtn) {
        this.settingsButton = settingsBtn;
    }

    public ImageButton getSettingsButton() {
        return settingsButton;
    }

    public void setHelpButton(ImageButton helpBtn) {
        this.helpButton = helpBtn;
    }

    public ImageButton getHelpButton() {
        return helpButton;
    }
    
    public ImageView getWarning_temp() {
		return warning_temp;
	}

	public void setWarning_temp(ImageView warning_temp) {
		this.warning_temp = warning_temp;
	}

	public ImageView getWarning_hum() {
		return warning_hum;
	}

	public void setWarning_hum(ImageView warning_hum) {
		this.warning_hum = warning_hum;
	}

	public RelativeLayout getHome_screen_layout() {
		return home_screen_layout;
	}

	public void setHome_screen_layout(RelativeLayout home_screen_layout) {
		this.home_screen_layout = home_screen_layout;
	}
}
